<?php

/**
 * KTDMessage form.
 *
 * @package    s-test
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class KTDMessageForm extends BaseKTDMessageForm
{
  public function configure()
  {
      $this->disableLocalCSRFProtection();
      unset(
              $this['created_at'],
              $this['updated_at'],
              $this['player_id'],
              $this['topic_id']
              );
     $this->setWidgets(array(
            'title' =>  new sfWidgetFormInputText(array('label' => 'Titre')),
            'body'  =>  new sfWidgetFormKTDTextarea(array('label' => 'Message', 'hrp_mode'=>true))
     ));
     $this->setValidators(array(
            'title' => new sfValidatorString(array('required' => false)),
            'body'  => new sfValidatorString(array('required' => true))
     ));
     $this->widgetSchema->setNameFormat("ktd_message[%s]");
  }
}
